The approaches described in this section are approaches that could be pursued, but not necessarily approaches that have been previously conceived or pursued. Therefore, unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section.
The techniques described herein relate generally to media data structures composed of video data and, optionally, accompanying audio data. However, for ease of understanding, these media data structures are typically characterized herein as simply “video” structures, such as “video files,” “video segments,” and “video sequences.” Any use of the term “video,” as used herein, will therefore be understood to refer equally to media data structures that include both video and audio data, unless otherwise stated or apparent from usage.
It is often desirable, for a variety of purposes, to deliver sequences of videos to end-user devices. For instance, when a viewer requests a movie from a movie streaming service, the service may wish to deliver the movie in such a manner that the viewer must watch a group of trailers before the movie. As another example, a news service may wish to deliver a set of video clips in sequence as part of a news broadcast. As yet another example, a television broadcaster may wish to divide a television show into various video segments interspersed with advertisement videos. As yet another example, a content distribution service such as YouTube may allow content providers to create playlists of different video segments to play in a sequence.
The creation of such a sequence is sometimes referred to as “video stitching.” More generally, video stitching may refer to the concatenation of two or more video segments in a sequence. Client-side video stitching is a common video stitching technique for video content downloaded or streamed over a network such as the Internet. Client-side video stitching is performed primarily by client application software executing on the viewer's own device, such as a web browser or mobile application. The client application software is configured by, for example, JavaScript or plugin code, to separately request each video segment of a sequence. Each video segment is from a different source address. The client application code “stitches” the segments together by transparently switching between playing the different video segments in an order corresponding to the sequence.
In many contexts, however, client-side video stitching is undesirable. For example, a client may be incapable of executing the proper instructions to implement client-side video stitching. Or, it may be desirable to present the stitched video to a client as a single video stream, so as to leverage the client's native support for fast-forwarding, skipping, or other trick-play operations through the entire sequence. For instance, it is sometimes desirable to stitch a video sequence together into a single video file that can be served via a web server through the Hyper-Text Transport Protocol (HTTP), by which means almost any modern web browser is capable of playing the video sequence.
Conventionally, server-side stitching involves processing each segment in a desired video sequence, concatenating the segments together into a single video file, and storing that file. Thus, the creation of a new sequence of video segments incurs great processing and storage costs. For example, consider a video stitching case in which an advertisement video is pre-rolled before a two hour movie. The content distributor may wish to offer different “versions” of the movie in which different advertisement videos are shown before the movie. For each version the content distributor wishes to make, the entire movie must be reprocessed with the relevant advertisement video(s), and each resulting stitched video must be stored as a separate copy of the movie. This overhead effectively limits the number of versions of the movie (i.e. the variety of advertisements before the movie) that the content distributor can effectively deliver.